package cn.com.headfree.vo.simple;

import cn.com.headfree.entity.TAcadeAchiveInfo;
import cn.com.headfree.util.SysDictionaryUtil;
import com.deepoove.poi.data.DocxRenderData;
import org.apache.commons.lang.StringUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class AcadeAchiveInfoVo {

    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    private String id;

    private Date pubTime;

    private String pubTimeStr;

    private String acadType;

    private String acadName;

    private String summary;

    private String pubName;

    private String periodicNo;

    private Integer page;

    private String issn;

    private String publisher;

    private String level;

    private String role;

    private String erpNo;

    private String userName;

    private Integer rank;

    private DocxRenderData acadeAchivePersonEx;

    public DocxRenderData getAcadeAchivePersonEx() {
        return acadeAchivePersonEx;
    }

    public void setAcadeAchivePersonEx(DocxRenderData acadeAchivePersonEx) {
        this.acadeAchivePersonEx = acadeAchivePersonEx;
    }

    public String getPubTimeStr() {
        return pubTimeStr;
    }

    public void setPubTimeStr(String pubTimeStr) {
        if (StringUtils.isNotBlank(pubTimeStr)) {
            this.pubTimeStr = pubTimeStr.split(" ")[0];
        } else {
            this.pubTimeStr = pubTimeStr;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getPubTime() {
        return pubTime;
    }

    public void setPubTime(Date pubTime) {
        this.pubTime = pubTime;
        if (pubTime!=null){
            this.pubTimeStr=sdf.format(pubTime).split(" ")[0];
        }
    }

    public String getAcadType() {
        return acadType;
    }

    public void setAcadType(String acadType) {
        this.acadType = acadType;
//        this.acadType = SysDictionaryUtil.getNameByValue("XueshuchengguoType",acadType);;
    }

    public String getAcadName() {
        return acadName;
    }

    public void setAcadName(String acadName) {
        this.acadName = acadName;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getPubName() {
        return pubName;
    }

    public void setPubName(String pubName) {
        this.pubName = pubName;
    }

    public String getPeriodicNo() {
        return periodicNo;
    }

    public void setPeriodicNo(String periodicNo) {
        this.periodicNo = periodicNo;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public String getIssn() {
        return issn;
    }

    public void setIssn(String issn) {
        this.issn = issn;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
//        this.level = SysDictionaryUtil.getNameByValue("XueshuchengguoJb",level);
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
//        this.role = SysDictionaryUtil.getNameByValue("XueshuchengguoJs",role);
    }

    public String getErpNo() {
        return erpNo;
    }

    public void setErpNo(String erpNo) {
        this.erpNo = erpNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }
}
